package org.electronic.registration.service;

import org.electronic.registration.bo.Doctor;
import org.electronic.registration.dao.DoctorDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * User: Egor
 * Date: 26.11.11
 */
@Service ("doctorService")
public class DoctorServiceImpl implements DoctorService {

    @Autowired
    private DoctorDao doctorDao;

    public List<Doctor> getAllDoctors() {
        return doctorDao.getAllDoctors();
    }

    public Doctor getDoctorByName(String name) {
        return doctorDao.getDoctorByName(name);
    }

    public void save(Doctor doctor) {
        doctorDao.save(doctor);
    }
}
